﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SaleOfMoviesSystem.Xml.Models
{
    public class Movie
    {
        public string Name { get; set; }
        public decimal Price { get; set; }
        public string Director { get; set; }
        public string MainPlayer { get; set; }
        public string ImgPath { get; set; }
        public string Description { get; set; }

        public List<MovieTime> MovieTimes { get; set; } = new List<MovieTime>();

        public Image Img
        {
            get
            {
                if (File.Exists(ImgPath))
                    return Image.FromFile(ImgPath);
                return null;
            }
        }
    }
}